create table jms_dm.dm_network_entry_port_aging_sign_detail_dt
(
    end_agent_code          varchar(100) COMMENT '末端代理区code',
    end_center_code         varchar(100) COMMENT '末端中心code',
    end_franchisee_code     varchar(100) COMMENT '末端加盟商code',
    final_sign_network_code varchar(100) COMMENT '末端网点',
    billcode                varchar(100) COMMENT '运单',
    end_agent_name          varchar(100) COMMENT '末端代理区',
    end_center_name         varchar(100) COMMENT '末端中心',
    end_franchisee_name     varchar(100) COMMENT '末端加盟商',
    final_sign_network_name varchar(100) COMMENT '末端网点',
    deliver_shift           varchar(100) COMMENT '班次',
    goods_type_code         varchar(100) COMMENT '货物类型code',
    goods_type_name         varchar(100) COMMENT '货物类型',
    order_source_code       varchar(100) COMMENT '订单来源code',
    order_source_name       varchar(100) COMMENT '订单来源',
    deliver_township_id     varchar(100) COMMENT '乡镇id',
    deliver_township_name   varchar(100) COMMENT '乡镇',
    is_common               varchar(100) COMMENT '是否共配',
    planned_departure_time  varchar(100) COMMENT '规划接件时间',
    actual_departure_time   varchar(100) COMMENT '实际接件时间',
    is_departure            varchar(100) COMMENT '接件是否准点',
    is_departure_type       varchar(100) COMMENT '不准点类型',
    planned_arrival_time    varchar(100) COMMENT '规划网点到车时间',
    actual_arrival_time     varchar(100) COMMENT '网点到车时间',
    is_arrival              varchar(100) COMMENT '到车是否准点',
    is_arrival_type         varchar(100) COMMENT '不准点类型',
    warehouse_end_time      varchar(100) COMMENT '派仓结束时间',
    deliver_time            varchar(100) COMMENT '出仓扫描时间',
    is_deliver              varchar(100) COMMENT '出仓是否准点',
    is_deliver_type         varchar(100) COMMENT '不准点类型',
    date_time               date COMMENT '中心法发件日期',
    final_plan_sign_date    varchar(100) comment '规划签收日期',
    final_plan_sign_time    varchar(100) comment '规划签收时间',
    aging_sign_time         varchar(100) comment '时效签收时间',
    is_aging_sign_on_time   varchar(100) comment '是否时效签收准点',
    shipment_no varchar(100) comment '任务号'
)
    ENGINE = OLAP DUPLICATE KEY(end_agent_code,end_center_code,end_franchisee_code,final_sign_network_code)
comment '网点进港时效运单明细'
PARTITION BY RANGE (date_time) (
   START ("2023-02-25") END ("2023-04-26") EVERY (INTERVAL 1 day))DISTRIBUTED BY HASH(final_sign_network_code) BUCKETS 10
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-365",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "10",
"in_memory" = "false",
"storage_format" = "V2"
);